package com.seng.resourcetycoon.gui.controllers;

import com.seng.resourcetycoon.util.ResourceReader;
import com.seng.resourcetycoon.util.SceneUtil;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

import java.net.URL;
import java.util.ResourceBundle;

public class HelloController implements Initializable {

    @FXML
    ImageView bgImageView;

    @FXML
    protected void handleClickNewGame() {
        SceneUtil.getInstance().closeCurrent();
        SceneUtil.getInstance().switchToGameSetup();
    }

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        bgImageView.setImage(new Image(ResourceReader.getResourceAsStream("bg.jpg")));
    }
}